import request from '@/utils/request.js';


// 查询订单列表
export function orderList(params) {
	return request({
		url: `/applet/order/getOrderList`,
		method: 'GET',
		needToken: true,
		// link: 'first',  // 写入link属性为first时使用baseURL2
		params: params
	})
}

// 删除订单
export function deleteOrders(orderIds) {
	return request({
		url: `/applet/order/${orderIds}`,
		method: 'DELETE',
		needToken: true,
		// link: 'first',  // 写入link属性为first时使用baseURL2
		// params: params
	})
}

// 查询订单详情
export function getOrderDetail(orderId) {
	return request({
		url: `/applet/order/getOrderInfo/${orderId}`,
		method: 'GET',
		needToken: true,
		// link: 'first',  // 写入link属性为first时使用baseURL2
		// params: params
	})
}

// 申请退款
export function refundPayment (data) {
	return request({
		url: '/applet/payment/cashier/applyService',
		method: 'POST',
		needToken: true,
		data
	})
}

// 评价订单
export function orderComment (data) {
	return request({
		url: '/applet/comment/comment',
		method: 'POST',
		needToken: true,
		data
	})
}


// 评价订单
export function getOrderComment (data) {
	return request({
		url: `/applet/comment/list/${data.objectId}/${data.objectType}`,
		method: 'GET',
		needToken: true,
		data
	})
}
//  export function myGroundOnshow(params) {
//   return http.request({
//     url: `/supply/trusteeship/land/update/status/${params.trusteeshipLandId}`,
//     method: Method.PUT,
// 	header:{
// 		accessToken: accessToken,
// 	},
// 	// needToken:true,
//     params,
//   });
// }